<?php

if(!function_exists("_get_level_info")){
    function _get_level_info($level = "STR"){
        $result = "Starter";
        if($level == 1) {
            $result = "Silver Eagle";
        } else if($level == 2) {
            $result = "Gold Eagle";
        } else if($level == 3) {
            $result = "Diamond";
        } else if($level > 3) {
            $result = "Crown Diamond";
        }        
        return $result;
    }
}

if(!function_exists("_get_profile_picture")){
    function _get_profile_picture($path, $sex = "L"){
        if(!file_exists($path)){
            return $sex == "P" ? base_url("assets/img/icon/woman.png") : base_url("assets/img/icon/man.png");
        } else {
            return "data:image/png;base64," . base64_encode(file_get_contents($path));
        }
    }
}



